import dataStore from './index'
const reducer = (state=dataStore.state,action:{type:string,value:number})=>{
    const newState = JSON.parse(JSON.stringify(state))
    console.log('reducer')
    if(dataStore.actions[action.type]){
        dataStore.actions[action.type](newState,action)
    }
    return newState
}

export default reducer